package com.tingyuge.io;

import java.io.InputStream;

/**
 * @author xiaodao
 * @version 1.0
 * @date 2021/6/2
 */
public class Resource {

    /**
     * 根据文件路径,将配置文件加载成字节输入流,存储在内存中
     * @param path
     * @return
     */
    public static InputStream getResourceAsStream(String path){
        InputStream resourceAsStream = Resource.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }
}
